package newdecoupling.intelligent_learning_assistance_system.controller;


import newdecoupling.intelligent_learning_assistance_system.comment.Result;
import newdecoupling.intelligent_learning_assistance_system.mapper.DeptMapper;
import newdecoupling.intelligent_learning_assistance_system.pojo.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeptController {

    @Autowired
    private DeptMapper deptMapper;

    @GetMapping("/dept")
//    private List<Dept> getDeptAllList(){
    private Result  getDeptAllList(){
        System.out.println("查询全部");
        List<Dept> list = deptMapper.findAll();
//        return Result.success();
//        return getDeptAllList();
        System.out.println(list);

       return Result.success(list);
    }



}
//package newdecoupling.
//        intelligent_learning_assistance_system.common;
